<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" />
    <meta name="keywords" content="{% block keyworks %}zxnn.net{% endblock %}" />
    <meta name="description" content="{% block description %}page of zxnn.net{% endblock %}" />
    <title>{% block title %}Zxnn.net{% endblock %}</title>
    <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes" />
    <link rel="icon" type="image/png" href="/img/favicon.png" />
    <link rel="stylesheet" href="/css/bootstrap.min.css">
    <link rel="stylesheet" href="/css/layout.css">
    <link href='http://fonts.googleapis.com/css?family=Ubuntu+Condensed' rel='stylesheet' type='text/css'>
    {% block style %}
    {% endblock %}
</head>
<body>
    <div style="background-color: #592C63;">
        <header id="header" class="container">
            <div id="userinfo" style="float: right;">
                <div class="btn-group" role="group">
                    {% if user %}
               
                <a class="btn btn-primary" href="#"><i class="icon-user icon-white"></i>{{ user.nickname }}</a>
                    <a class="btn btn-primary dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
                    <ul class="dropdown-menu">
                        <li><a href="{{ log_url }}"><i class="icon-off"></i>Logout</a></li>
                    </ul>
                    {% else %}
               
                <a class="btn btn-primary" href="{{ log_url }}"><i class="icon-user icon-white"></i>Login</a>
                    {% endif %}
               
                </div>
            </div>
            <h1 id="sitename"><a href="/">Zxnn</a></h1>
        </header>
    </div>
    <div style="background-color: #222;">
        <div class="container" style="padding: 0;">
            <nav class="navbar navbar-inverse" role="navigation" style="margin-bottom: 0;">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#menu">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                </div>
                <div class="collapse navbar-collapse" id="menu">
                    <ul class="nav navbar-nav">
                        {% block menu %}{% endblock %}
           
                    </ul>
                </div>
            </nav>
        </div>
    </div>
    <main id="container" class="container">
        <div id="content" class="span8">
            {% block content %}{% endblock %}
        </div>
        <div id="sidebar" class="span3 offset1">
            {% block sidebar %}{% endblock %}
        </div>
    </main>
    <footer id="footer" class="container">
        <p>by <a href="mailto:root@zxnn.net">將王車</a>&nbsp;<span>2008-2015</span>&nbsp;using:&nbsp;<a href="http://appengine.google.com/">app engine</a>&nbsp;·&nbsp;<a href="http://twitter.github.com/bootstrap/">bootstrap</a></p>
    </footer>
    <script type="text/javascript" src="/script/jquery-2.1.1.js"></script>
    <script type="text/javascript" src="/script/bootstrap.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $('#container').css('min-height', $(window).height() - 260);
            $(window).resize(function () {
                $('#container').css('min-height', $(window).height() - 260);
            });

            $('#menu a').click(function (e) {
                //e.preventDefault();
                $(this).tab('show');
            });
        })
    </script>
    {% block script %}
    {% endblock %}
   
    <!-- google analytics -->
    <script type="text/javascript">
        var _gaq = _gaq || [];
        _gaq.push(['_setAccount', 'UA-319269-6']);
        _gaq.push(['_trackPageview']);

        (function () {
            var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
            ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
        })();
    </script>
</body>
</html>
